﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Text;
using FwProject.Comm.ExcelUtil;
using FwProject.ShoppingMall.Com;

namespace FwProject.Com.Dto
{
    [DisplayName(displayName:"供应商订单")]
    public class SupplierOrdersDto
    {
        public Guid Id { get; set; }
        /// <summary>
        /// 订单号
        /// </summary>
        [DisplayName(displayName:"订单号")]
        [ExcelDateMember]
        [Display(Name = "订单号")]
        public string OrderNumber { get; set; }

        [DisplayName(displayName: "下单时间")]
        [ExcelDateMember]
        public DateTime OrderTime { get; set; }

        /// <summary>
        /// 商品编号
        /// </summary>
        [Display(Name = "商品编号")]
        public Guid ShopproductId { get; set; }
        [DisplayName(displayName: "商品名称")]
        [ExcelDateMember]
        public string ProductName { get; set; }

        public Guid SupplierId { get; set; }

        [DisplayName(displayName: "供应商名称")]
        [ExcelDateMember]
        public string SupplierName { get; set; }

        /// <summary>
        /// 购买数量
        /// </summary>
        [Display(Name = "购买数量")]
        [DisplayName(displayName: "购买数量")]
        [ExcelDateMember]
        public int ProductCount { get; set; }

        /// <summary>
        /// 付款时单价
        /// </summary>
        [Display(Name = "付款时单价")]
        [DisplayName(displayName: "单价")]
        [ExcelDateMember]
        public decimal PayPrice { get; set; }

        /// <summary>
        /// 规格成本价
        /// </summary>
        [Display(Name = "规格成本价")]
        public decimal SpcecostPrice { get; set; }

        /// <summary>
        /// 支付金额
        /// </summary>
        [DisplayName(displayName: "支付金额")]
        [ExcelDateMember(IsSum =true)]
        public decimal TotalPrice { get; set; }

        /// <summary>
        /// 订单发货状态
        /// </summary>
        [Display(Name = "订单发货状态")]
        [DisplayName(displayName: "发货状态")]
        [ExcelDateMember]
        public DeliveryStatus DeliveryStatus { get; set; } = DeliveryStatus.未发货;
        /// <summary>
        /// 发货时间
        /// </summary>
        [Display(Name = "发货时间")]
        [DisplayName(displayName: "发货时间")]
        [ExcelDateMember]
        public DateTime? DeliveryTime { get; set; }

        /// <summary>
        /// 评价
        /// </summary>
        [Display(Name = "评价状态")]
        public EvaluateStatus EvaluateStatus { get; set; } = EvaluateStatus.未评价;

        /// <summary>
        /// 结算状态
        /// </summary>
        [Display(Name = "结算状态")]
        [DisplayName(displayName: "结算状态")]
        [ExcelDateMember]
        public SettlementStatus SettlementStatus { get; set; } = SettlementStatus.未结算;
        /// <summary>
        /// 供货商结算时间
        /// </summary>
        [Display(Name = "供货商结算时间")]
        [DisplayName(displayName: "结算时间")]
        [ExcelDateMember]
        public DateTime? SettlementTime { get; set; }

        /// <summary>
        /// 退货状态
        /// </summary>
        [Display(Name = "退货状态")]
        public Returngoods Returngoods { get; set; } = Returngoods.未退货;

        /// <summary>
        /// 差价
        /// </summary>
        [Display(Name = "差价")]
        public decimal PriceDifference { get; set; } = 0m;
    }
}
